import { Guard } from '../../constants/guard';

export default [
  {
    path: '/upgrade',
    name: 'upgrade',
    meta: {
      title: '升级管理',
      svg: 'upgrade',
      layout: true,
      guardList: [
        Guard.UpgradeView,
        Guard.UpgradeManage,
        Guard.DeviceSettingView,
        Guard.DeviceSettingManage,
        Guard.PackageView,
        Guard.PackageManage,
        Guard.ProductManage,
        Guard.ProductView,
        Guard.UpgradeActivityLogView,
        Guard.UpgradeActivityLogManage,
        Guard.ProductTypeView,
        Guard.ProductTypeManage
      ]
    },
    redirect: '/upgrade/device/setting/list'
  },
  {
    path: '/upgrade/productType/list',
    name: 'productType',
    meta: {
      title: '产品类型',
      svg: 'device-type',
      layout: true,
      parentMenu: 'upgrade',
      guardList: [Guard.ProductTypeView, Guard.ProductTypeManage]
    },
    component: () => import('../../views/productType/list/index.vue')
  },
  {
    path: '/upgrade/device/list',
    name: 'upgradeDevice',
    meta: {
      title: '产品列表',
      svg: 'device-list',
      layout: true,
      parentMenu: 'upgrade',
      guardList: [Guard.ProductView, Guard.ProductManage]
    },
    component: () => import('../../views/upgradeDevice/list/index.vue')
  },
  {
    path: '/upgrade/device/setting/list',
    name: 'deviceSetting',
    meta: {
      title: '参数列表',
      svg: 'device-setting',
      layout: true,
      parentMenu: 'upgrade',
      guardList: [Guard.DeviceSettingView, Guard.DeviceSettingManage]
    },
    component: () => import('../../views/deviceSetting/list/index.vue')
  },
  {
    path: '/upgrade/package/list',
    name: 'package',
    meta: {
      title: '升级包列表',
      svg: 'package',
      layout: true,
      parentMenu: 'upgrade',
      guardList: [Guard.PackageView, Guard.PackageManage]
    },
    component: () => import('../../views/package/list/index.vue')
  },
  {
    path: '/upgrade/upgradeActivityLog/list',
    name: 'package',
    meta: {
      title: '升级日志',
      svg: 'log',
      layout: true,
      parentMenu: 'upgrade',
      guardList: [Guard.UpgradeActivityLogView, Guard.UpgradeActivityLogManage]
    },
    component: () => import('../../views/upgradeStrategy/upgradeActivityLog/index.vue')
  },
  {
    path: '/upgrade/strategy/list',
    name: 'strategy',
    meta: {
      title: '升级策略',
      svg: 'upgrade-strategy',
      layout: false,
      parentMenu: 'upgrade',
      guardList: [Guard.UpgradeView, Guard.UpgradeManage]
    },
    component: () => import('../../views/upgradeStrategy/list/index.vue')
  }
];
